﻿using System;

namespace ZYCommon
{
   

    public class Format_NoInList : Format_InList
    {
        public override bool Test(string strValue)
        {
            if ((base.strSetting != null) && (strValue != null))
            {
                strValue = strValue.Trim();
                string[] items = base.GetItems(base.strSetting);
                if (items.Length > 0)
                {
                    foreach (string str in items)
                    {
                        if (strValue.Equals(str.Trim()))
                        {
                            return true;
                        }
                    }
                    return false;
                }
            }
            return true;
        }

        public override string DisplayName
        {
            get
            {
                return ("不得出现[" + base.strSetting + "]中的任一个");
            }
        }

        public override string Name
        {
            get
            {
                return "notinlist";
            }
        }
    }
}

